FROM harbor.sit.hupu.io/ci/maven as builder
RUN mkdir /opt/app -p && mkdir /opt/package/basketball-all-api/ -p
WORKDIR /opt/app
COPY . .
RUN mvn clean install -Dmaven.test.skip=true


FROM harbor.sit.hupu.io/ci/openjdk:1.8.0
RUN mkdir /opt/app -p
WORKDIR /opt/app

COPY --from=builder /opt/app/basketball-all-api-web/target/basketball-all-api-exec.jar /opt/app/basketball-all-api-exec.jar
COPY --from=builder /opt/app/entrypoint.sh /opt/app/entrypoint.sh
RUN chmod +x /opt/app/entrypoint.sh
entrypoint ["/opt/app/entrypoint.sh"]



